<!DOCTYPE html>
<html>
  <head>
    <title>预注册客户管理列表</title>
    <#include "/inc/base-style.ftl">
    <link rel="stylesheet" href="${staticPath}/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="${staticPath}/crm/dict/css/form_element.css">
  </head>
  <body class="${bodyClass}">
    <div class="wrapper">
      <!-- Main Header -->
     <#include "/inc/main-header.ftl">
      <!-- Left side column. contains the logo and sidebar -->
         <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <#include "/inc/slidebar-menu.ftl">
        </section>
        <!-- /.sidebar -->
      </aside>

   <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
			预注册客户列表	 
          </h1>
        </section>

        <!-- Main content -->
        <section class="content">
	    <!-- query start -->
			<div class="panel panel-default">
				  <div class="panel-body">
					   <form class="form-horizontal" action="">
					    <div class="control-group form-group ">
						 <label class="control-label iinputfirst col-sm-2">沟通状态：</label> 
							<div class="col-sm-2">
							 <select class="form-control" id="province" name="province" style="width: 180px;">
								<option value="-1">全部</option>
								<#list approveStatus_dicts as dict>
								       <option value="${dict.itemKey}">${dict.itemName}</option>
								</#list>  
							</select>
							</div>
							 <label class="control-label iinput col-sm-2">不符原因：</label> 
								<div class="col-sm-2">
								 <select class="form-control" id="mainIndustry" name="mainIndustry" style="width: 180px;">
									<option value="-1">全部</option>
									<#list auditType_dicts as dict>
									<#if dict.itemKey== dto.approveStatus>
								    <option value="${dict.itemKey}" selected = "selected">${dict.itemName}</option>
									<#else>
									       <option value="${dict.itemKey}">${dict.itemName}</option>
									 </#if>
									</#list>  
								</select>
								</div>
							 <label class="control-label iinput col-sm-2">是否分配：</label> 
								<div class="col-sm-2">
								 <select class="form-control" id="username" name="username" style="width: 180px;">
									<option value="-1">全部</option>
									<#list isAssign_dicts as dict>
									       <option value="${dict.itemKey}">${dict.itemName}</option>
									
									</#list>  
								</select>
							</div>
						</div> 
						<div class="control-group form-group ">
						 <label class="control-label iinputfirst col-sm-2">企业地区：</label> 
							<div class="col-sm-2">
							 <select class="form-control" id="province" name="province"  style="width: 180px;" >
								   <option value="-1">全部</option>
			                        <#list districtList as dictrict>
			                        <option value="${dictrict.key}" <#if dictrict.key == dto.dictrict>selected="selected"</#if>>${dictrict.value}</option>
			                        </#list> 
							</select>
							</div>
							 <label class="control-label iinput col-sm-2">主营行业：</label> 
								<div class="col-sm-2">
								 <select class="form-control" id="mainIndustry" name="mainIndustry" style="width: 180px;">
								  <option value="-1">全部</option>
								  <#list industryList as industry>
						            <option value="${industry.key}" <#if dto.industry?contains(industry.key) >selected="selected"</#if> >${industry.value}</option>
						           </#list> 
								</select>
								</div>
							 <label class="control-label iinput col-sm-2">企业营业额：</label> 
								<div class="col-sm-2">
								 <select class="form-control" id="username" name="username" style="width: 180px;">
								 <option value="-1">全部</option>
								 <#list turnoverList as turnover>
			                        <option value="${turnover.key}" <#if dto.turnover?contains(turnover.key) >selected="selected"</#if> >${turnover.value}</option>
			                      </#list>
								</select>
							</div>
						</div> 
						<div class="control-group form-group ">
						 <label class="control-label iinputfirst col-sm-2">预注册起始时间：</label> 
							<div class="col-sm-2">
							   <input type="text" class="form-control my_timepicker" id="time1"  name="time1" value="" style="width: 180px;"/>
							</div>
							 <label class="control-label iinput col-sm-2">预注册结束时间：</label> 
								<div class="col-sm-2">
									<input type="text" class="form-control my_timepicker" id="time2"  name="time2" value="" style="width: 180px;"/>
								</div>
							 <label class="control-label iinput col-sm-2">所属部门：</label> 
								<div class="col-sm-2">
								 <select class="form-control" id="username" name="username" style="width: 180px;">
									<option value="-1">全部</option>
			                        <#list departments as dp>
			                        <option value="${dp.id}" <#if dp.id==dto.departmentId>selected="selected"</#if> >${dp.name}</option>
			                        </#list> 
								</select>
							</div>
						</div> 
						<div class="control-group form-group ">
						     <label class="control-label iinputfirst col-sm-2">会籍经理：</label> 
								<div class="col-sm-2">
								 <select class="form-control " id="username" name="username" style="width: 180px;">
									<option value="">全部</option>
									<#list auditType_dicts as dict>
									<#if dict.itemKey=="${report.auditType}">
									<option value="${dict.itemKey}" selected = "selected">${dict.itemName}</option>
									<#else>
									       <option value="${dict.itemKey}">${dict.itemName}</option>
									 </#if>
									</#list>  
								</select>
							</div>
							 <label class="control-label iinput col-sm-2">关键字：</label> 
							<div class="col-sm-2">
							  <input type="text" class="form-control" id="keyWords"  name="keyWords" value="" style="width: 180px;"/>
							</div>
							<div class="col-sm-4" >
                                <input type="submit" class="btn btn-primary btn-search" value="查询" /> 							
                                <input type="submit"  class="btn btn-info" value="导出Excle" /> 							
                            </div>
						</div>
					   </form>
				    </div>
				</div>
			<!-- query end -->
			<!-- /.box-header -->
			<div class="box-body">
				<table id="example" class="table table-hover">
					<thead>
						<tr>
							<th width="80">姓名</th>
							<th width="80">职务</th>
							<th width="120">公司名称</th>
							<th width="90">营业额</th>
							<th width="90">主营行业</th>
							<th width="90">企业地区</th>
							<th width="90">会籍经理</th>
							<th width="120">预注册日期</th>
							<th width="90">来源</th>
							<th width="90">沟通状态</th>
							<th width="90">是否分配</th>
							<th width="120">操作</th>
					</tr>
					</thead>	
					<tbody id ="c_tbody">
					<#if (lists?size>0) >
					   <#list lists as register>
						<tr data-uid="${register.uid}" data-uname="${register.uid}" >
							<td>${register.userName}</td>
							<td>${register.position}</td>
							<td>${register.company}</td>
							<td>${register.newturnover}</td>
							<td>${register.mainIndustry}</td>
							<td>${register.clientArea}</td>
							<td>${register.username}</td>
							<td>${register.creationDate?string("yyyy-MM-dd")}</td>
							<td>${register.comeFrom}</td>
							<td>${register.approveStatus}</td>
							<td>
							<#if (register.isAssign==0) >
								未分配
								<#else>
							             已分配 
						    </#if>
							</td>
							<td> 
                                <!-- Single button -->
                                <div class="btn-group">
                                  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                                                                               操作列表 <span class="caret"></span>
                                  </button>
                                  <ul class="dropdown-menu" style="left:-30px;">
                                     <li><a href="/crm/userpreregister/userPreRegisterViewPage?uid=${register.uid}">查看</a></li>
                                     <li><a href="javascript:;" onclick="assignMemship(${register.uid});return false;">预注册数据分配</a></li>
                                     <li><a href="javascript:;" onclick="isStandard(${register.uid},1);return false;">符合标准</a></li>
                                     <li><a href="javascript:;" onclick="isStandard(${register.uid},0);return false;">不符合标准</a></li>
                                     <li><a href="javascript:;" onclick="isStandard(${register.uid},0);return false;">跟踪记录</a></li>                                                                                                                                            
                                  </ul>
                                </div>
                            </td>
							
						</tr>
						</#list>
                 <#else>
			                暂无数据
			     </#if>
					</tbody>
				</table>
			</div>
			<div class="box-footer">
			<!--	<a id="dict-create-btn" href="javascript:;" class="btn btn-success pull-left">新建字典项</a> -->
				<@zhd.page pm url />
			</div>
		</div>

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
    <#include "/inc/main-footer.ftl">
   <!-- Control Sidebar -->
      <!-- /.control-sidebar -->
      <!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
      
    </div><!-- ./wrapper -->

	<#include "/inc/base-script.ftl">
	<#include "/inc/alert.ftl">
    <#include "/crm/userPreRegister/model/assignMemship.ftl">
    <!-- 自定义script -->
	<#include "/script/userPreRegister/userPreRegisterScript.ftl">
	
<script>
	$(function(){
     $('.my_timepicker').datetimepicker({
        dayViewHeaderFormat: 'YYYY MMMM',
        locale: 'zh-cn',
        format: 'YYYY-MM-DD',
        keepInvalid: true
    });  
  // 设置预注册起始时间和结束时间
  	
    $('#time1,#time2').data('DateTimePicker').useCurrent(false);
   
    $("#time1").on("dp.change", function (e) {
        $('#time2').data("DateTimePicker").minDate(e.date);
    });
    $("#time2").on("dp.change", function (e) {
        $('#time1').data("DateTimePicker").maxDate(e.date);
    }); 
});
</script>
  </body>
</html>

